home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 1.iso
/
ARGONET
/
PD
/
COMMS
/
IRCMACRO.ZIP
/
!IRCMacro
/
!Help
next >
Wrap
Text File
|
1996-08-04
|
7KB
|
143 lines
Name : !IRCMacro
Purpose : A macro insertion tool to make IRC easier
Author : Richard Goodwin
Status : Freeware
Version : 2.00 (April 1996)
Features : User definable macros for common IRC commands
Idea : This particular incarnation thanks to Chris Hawkins
This application, along with all files contained within, © Richard Goodwin
1996. This application may be freely distributed by any means AS LONG AS:
* all files remain intact, with the possible except of the macro definition
and option files (see below)
* wherever possible the default definition and option files are distributed,
rather than customised ones (aimed more at PD libraries etc. than users)
The macro file is: ..Scripts.Script; the options file is ..Resources.Options
* no unreasonable charge is made.
Preamble:
~~~~~~~~~
IRC is a nice way of getting to meet people. There you are, uploading a huge
Web site, twiddling your thumbs, when along comes someone from the other side
of the world to make the passing time seem more fleeting.
Yeah, right.
Anyway, IRCMacro is designed to help you by cutting down on the repition of
typing in commonly-used phrases and commands by inserting them at the touch of
a button. It also has the added side affect of making you quicker on the
draw...
IRCMacro is a quick bodge on HTMacroL and HTML², which were macro insertions
tools for designing web pages. I tried using normal macro insertion tools, but
they just didn't quite work how I wanted - too slow, couldn't see enough
buttons, forever having to define or load definitions etc. So, I wrote one
myself! And out of that IRCMacro was born - because all of the work was
already done, these instructions are actually taking me more time than the
coding. I guess you could use it for inserting all sorts of things - I have
macros set up in HTML² for signing off my emails the same way, common email
addresses etc. These macros can go just about anywhere - text editors and word
processors, writable icons, telnet sessions...
Starting Up:
~~~~~~~~~~~~
Pretty simple really. Double-click on the !IRCMacro icon to load it, and an
strangely familiar icon will appear on the icon bar. Clicking with the LEFT
mouse button opens the window which will allow you to select a macro to "type";
clicking with the RIGHT mouse button will load the macro definitions into your
text editor. Of course the MIDDLE mouse button will open a menu.
The Menu:
~~~~~~~~~
___________
|_IRC_Macro_|
| Info >| - pretty obvious really
|-----------|
| Macros >| - opens macro window, whether you click on it or follow the ">"
|-----------|
| Reload | - if you alter the script file, click this to use it instantly
| Save | - click on this to save the current definitions as default
|-----------|
|_Quit______| - Quits the program (surprise!).
Editing Macros:
~~~~~~~~~~~~~~~
Looking at the "Script" file you can see that everything is pretty self
explanitary; altering the text after "IRCDefXX=" will define the macro for
whatever XX is (one to twelve); it can be any length up to 255 characters, with
any characters apart from a carriage return (which the program takes to be the
end of the definition) and a backslash - "\". The backslash is used to tell
the program to insert a carriage return when typing the macro. "IRCTagXX="
defines what text will appear in the IRCMacro window at position XX - this
should be no more than about 25 characters.
Here's an example:
IRCDef02=/away\
IRCTag02=away
The "IRCDef02=" part means define macro 2; in this case it is being defined to
type "/away" and then simulate the pressing of the RETURN key (that's what that
"\" on the end is for). The "IRCTag02=" means that you are defining what
appears in the IRC Macro window for this entry (just the word "away")
If the "Script" file is accidentally deleted, there's no need to worry.
Firstly, !IRCMacro won't crash if it doesn't find the file - it just defines
its own macros and uses them. Secondly, if you do lose a definition file you
can click on "Save" to generate a new one. Or if you've just lost a file, look
in "!IRCMacro.Backups" - there might be a backup file (it does this when you
click on "Save" just in case...).
A lot of work has gone into making sure you don't crash the program with bad
definitions: definitions /don't/ have to be in the same order, the names
/don't/ have to be in capital or lower case letters, and /don't/ have to be all
there - !IRCMacro checks the file for any macro or tag definitions, and if it
finds any it converts the variable part at the front to capitals automatically
then matches them up with the correct program variables. All you have to do is
make sure there's an "=" right after the definition with gaps, 'cos if there
isn't it will be ignored. Finally the numbers in the definitions (i.e. the
"02" in "IRCTag02") don't have to have that leading zero, it's just there so
that everything lines up nicely.
You can also have more than one file of macros - if you drop a text file
onto the iconbar icon or the macro window it will be parsed to see if any
macros can be found, so you can have a whole set sitting on your hard drive...
Note that these are cumulative, i.e. loading a new definitions file only
overwrites the icons which are defined and leaves all the other macros alone,
so if you just create a file with IRC01 defined and drop this onto the icon,
IRC02-IRC12 will be unaffected. If you drop a set of macros onto the icon and
think, "Hmm, wouldn't it be nice to have those as the default ones," then just
click on the "Save" menu option and the program will make it so.
Have fun!
Rich, August '96
email rich.goodwin@argonet.co.uk
Oh yes, almost forgot - if you leave the window open when you quit the program,
it'll re-open in the bottom right of the screen when you next load it. This is
switched on by default.
Versions:
~~~~~~~~~
1.00: Chopped !HTML² up into !IRCMacro in about half an hour.
HTML version:
2.00: Seperated into 4 windows (and so 4 icons - easier than I hoped!); finally
got it to do a colour palette; figured out changing writing on buttons
and saving window states. Reload function added, as well as the loading
definitions into a text editor. Dropping files on icon/windows to do
file-specific macros (or load as definitions) added.
1.04: Added </P> button and changed default centring commands to be compatible
with Netscapisms/HTML3. Distributed via ArgoNet WebPack package.
1.03: Clicking on a button while a macro was part-way through insertion stopped
the first macro and the second took over. Now they'll form an orderly
queue, space permitting (otherwise you'll get a beep). Speed increased
by only polling every fifth character (or on a linespace or space).
1.02: added polling after each character insert so that characters didn't get
lost and line feeds didn't screw up the text underneath. Slows it down a
little, but not too much. Tested in StrongEd, Edit and Zap.
1.01: when I actually got round to using it in a real situation, realised I'd
forgotten to include <center> and </center>. Oh well...
1.00: first version